#include "AirCompressor.h"
#include "../Robotmap.h"
#include "../Commands/PumpTheAir.h"

TheAirCompressor::TheAirCompressor() : Subsystem("AirCompressor") {
	
	compressor = new Compressor(RobotMap::PNEU_PRESSURE_SWITCH,
								RobotMap::PNEU_COMPRESSOR_RLY);
}

void TheAirCompressor::InitDefaultCommand() {
	SetDefaultCommand(new PumpTheAir());
}

void TheAirCompressor::start() {
	compressor->Start();
}

void TheAirCompressor::stop() {
	compressor->Stop();
}

bool TheAirCompressor::isAirTankFull() {
	return compressor->GetPressureSwitchValue();
}


bool TheAirCompressor::isEnabled() {
	return compressor->Enabled();
}
